package com.blankland.dataanalysis.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Date;
import lombok.Data;

/**
 * 伽马数据表
 * @TableName sess_gamma_data
 */
@TableName(value ="sess_gamma_data")
@Data
public class GammaData implements Serializable {
    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Long dataId;

    /**
     * 设备id
     */
    private Long deviceId;

    /**
     * 谱线数组
     */
    private String spectLine;

    /**
     * 经度
     */
    private String longitude;

    /**
     * 纬度
     */
    private String latitude;

    /**
     * 高度 米
     */
    private String height;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * GPS信息
     */
    private String gpsStr;

    /**
     * 
     */
    private Date gpsTime;

    /**
     * 解析标记（0:没有解析 1:已经解析）
     */
    private Integer isAnalysis;

    /**
     * 原始数据二进制
     */
    private byte[] originData;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        GammaData other = (GammaData) that;
        return (this.getDataId() == null ? other.getDataId() == null : this.getDataId().equals(other.getDataId()))
            && (this.getDeviceId() == null ? other.getDeviceId() == null : this.getDeviceId().equals(other.getDeviceId()))
            && (this.getSpectLine() == null ? other.getSpectLine() == null : this.getSpectLine().equals(other.getSpectLine()))
            && (this.getLongitude() == null ? other.getLongitude() == null : this.getLongitude().equals(other.getLongitude()))
            && (this.getLatitude() == null ? other.getLatitude() == null : this.getLatitude().equals(other.getLatitude()))
            && (this.getHeight() == null ? other.getHeight() == null : this.getHeight().equals(other.getHeight()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getGpsStr() == null ? other.getGpsStr() == null : this.getGpsStr().equals(other.getGpsStr()))
            && (this.getGpsTime() == null ? other.getGpsTime() == null : this.getGpsTime().equals(other.getGpsTime()))
            && (this.getIsAnalysis() == null ? other.getIsAnalysis() == null : this.getIsAnalysis().equals(other.getIsAnalysis()))
            && (Arrays.equals(this.getOriginData(), other.getOriginData()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getDataId() == null) ? 0 : getDataId().hashCode());
        result = prime * result + ((getDeviceId() == null) ? 0 : getDeviceId().hashCode());
        result = prime * result + ((getSpectLine() == null) ? 0 : getSpectLine().hashCode());
        result = prime * result + ((getLongitude() == null) ? 0 : getLongitude().hashCode());
        result = prime * result + ((getLatitude() == null) ? 0 : getLatitude().hashCode());
        result = prime * result + ((getHeight() == null) ? 0 : getHeight().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getGpsStr() == null) ? 0 : getGpsStr().hashCode());
        result = prime * result + ((getGpsTime() == null) ? 0 : getGpsTime().hashCode());
        result = prime * result + ((getIsAnalysis() == null) ? 0 : getIsAnalysis().hashCode());
        result = prime * result + (Arrays.hashCode(getOriginData()));
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", dataId=").append(dataId);
        sb.append(", deviceId=").append(deviceId);
        sb.append(", spectLine=").append(spectLine);
        sb.append(", longitude=").append(longitude);
        sb.append(", latitude=").append(latitude);
        sb.append(", height=").append(height);
        sb.append(", createTime=").append(createTime);
        sb.append(", gpsStr=").append(gpsStr);
        sb.append(", gpsTime=").append(gpsTime);
        sb.append(", isAnalysis=").append(isAnalysis);
        sb.append(", originData=").append(originData);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}